package com.ouc.mapper;

import com.ouc.entity.CartItem;
import com.ouc.vo.OutCartItem;
import org.apache.ibatis.annotations.Mapper;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * @Name: ShoppingCarMapper
 * @Description:
 * @Author: Mr.Tong
 */
@Mapper
@Repository
public interface CartItemMapper {
    public Boolean insertItem(CartItem cartItem);

    public CartItem getItemByFrameCodeAndUserId(String frameCode, Integer userId);

    public Boolean updateQuantityAndTotalCost(CartItem cartItem);

    public List<OutCartItem> getAllCartItems(Integer userId);


    public List<OutCartItem> getAllCartItemsByPaging(Integer userId,Integer page,Integer limit);


}
